import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

/**
 * @ClassName item
 * @description:
 * @Author 陈Ser
 * @Date 2021/9/6 10:24
 * @Version 1.0
 */
public class 输入数在随机数组里找 {

    public static void main(String[] args) {
        int[] arr = new int[8];
        for (int i = 0; i < arr.length; i++) {
            int randNumber = new Random().nextInt(43) + 23;
            arr[i] = randNumber;
        }
        System.out.println("arr: " + Arrays.toString(arr));

        int number = 0;
        Scanner scanner = new Scanner(System.in);
        if (scanner.hasNextInt()) {
            number = scanner.nextInt();
        }
        for (int item :
                arr) {
            if (item == number) {
                System.out.println("找到...");
                return;
            }
        }
        System.out.println("找不到");

    }
}
